var AddFunction = function () {
    var that = this;
    this.init = function () {
        layui.use(['form', 'layer', 'layedit', 'laydate', 'upload', 'util'], function () {
            var form = layui.form
            layer = parent.layer === undefined ? layui.layer : top.layer,
                laypage = layui.laypage,
                upload = layui.upload,
                layedit = layui.layedit,
                laydate = layui.laydate,
                $ = layui.jquery;
            util = layui.util;
 /*           form.verify({
                picName: [
                    /^[\S]*$/,
                    '您输入内容不能含有空格，请重新输入！'
                ],
                picAddress: [
                    /^[\s\S]*.*[^\s][\s\S]*$/,
                    '图片不能为空！'
                ],
            });
            //图片上传
            layuiFunciton.uploadFile({
                elem: '#showSlideshowPicture',
                url: '/tu/file/fileUpload/uploadFile?code=image&isShrink=false',
                done: function (res, index, upload) {
                    if (res.code == '00000') {
                        top.layer.msg("图片上传成功！");
                        $('#showSlideshowPicture').attr('src', res.data[0].relativePath);
                        $("#storageSlideshowPicture").val(res.data[0].relativePath);
                    } else {
                        top.layer.msg("图片上传失败！");
                    }
                }
            });*/
            layuiFunciton.formSubmit({
                filterName:'editSysMenu',  //监听提交按钮   例如：filterName： updateSubmit   <button class="layui-btn" lay-submit  lay-filter="updateSubmit" >保存</button>
                url:  layuiFunciton.URL + '/gh/wx/menu/update',//提交路径
                formId:'editSysMenuForm',//form表单ID
                success:function (data) {
                    layuiFunciton.closeOpen();
                }
            });
            /* layui.layer.tips('链接格式类似www.baidu.com', '#myTips', {
             tips: 3
             }, 500);*/
            $("#myTips").click(function () {
                layui.layer.tips('链接格式类似www.baidu.com', '#myTips', {
                    tips: 3
                }, 500);
            });

        });
    };
};

$(function () {
    var addFunction = new AddFunction();
    addFunction.init();
});



